mirror of
https://github.com/nostrlabs-io/zap-stream-flutter.git
synced 2025-06-16 20:08:50 +00:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
a66eb8c338
|
|||
f570f4c1f2
|
|||
71563bc5ce
|
@ -233,7 +233,7 @@ StreamInfo extractStreamInfo(Nip01Event ev) {
|
|||||||
|
|
||||||
String getHost(Nip01Event ev) {
|
String getHost(Nip01Event ev) {
|
||||||
return ev.tags.firstWhere(
|
return ev.tags.firstWhere(
|
||||||
(t) => t[0] == "p" && t.length > 2 && t[3] == "host",
|
(t) => t[0] == "p" && t.length > 3 && t[3] == "host",
|
||||||
orElse: () => ["p", ev.pubKey], // fake p tag with event pubkey
|
orElse: () => ["p", ev.pubKey], // fake p tag with event pubkey
|
||||||
)[1];
|
)[1];
|
||||||
}
|
}
|
||||||
|
@ -33,11 +33,15 @@ class __ChatRaidMessage extends State<ChatRaidMessage>
|
|||||||
|
|
||||||
_from =
|
_from =
|
||||||
widget.event.tags.firstWhereOrNull(
|
widget.event.tags.firstWhereOrNull(
|
||||||
(t) => t[0] == "a" && (t[3] == "from" || t[3] == "root"),
|
(t) =>
|
||||||
|
t[0] == "a" && t.length > 3 && (t[3] == "from" || t[3] == "root"),
|
||||||
)?[1];
|
)?[1];
|
||||||
_to =
|
_to =
|
||||||
widget.event.tags.firstWhereOrNull(
|
widget.event.tags.firstWhereOrNull(
|
||||||
(t) => t[0] == "a" && (t[3] == "to" || t[3] == "mention"),
|
(t) =>
|
||||||
|
t[0] == "a" &&
|
||||||
|
t.length > 3 &&
|
||||||
|
(t[3] == "to" || t[3] == "mention"),
|
||||||
)?[1];
|
)?[1];
|
||||||
_isRaiding = _from == widget.stream.aTag;
|
_isRaiding = _from == widget.stream.aTag;
|
||||||
final isAutoRaid =
|
final isAutoRaid =
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
name: zap_stream_flutter
|
name: zap_stream_flutter
|
||||||
description: "zap.stream"
|
description: "zap.stream"
|
||||||
publish_to: "none"
|
publish_to: "none"
|
||||||
version: 1.1.3+17
|
version: 1.1.4+18
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.7.2
|
sdk: ^3.7.2
|
||||||
|
flutter: ^3.32.0
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
|
Reference in New Issue
Block a user